<?php
/**
 * Created by PhpStorm
 * User: lcz
 * Date: 2019/10/29
 * Time: 8:58
 * 文章
 */
namespace app\api\controller;

use app\common\controller\Api;
use think\Db;

class Article extends Api {
	protected $noNeedLogin = '*';
	
	/**
	 * 详情
	 */
	public function detail() {
		$id = $this->request->post('id');
		!$id && $this->error('参数错误');
		
		$row = Db::name('article')->field('title, image, content')->find($id);
		$this->success('查询成功', $row);
	}
}